package com.czy.workflow.core.service.dao;

import com.czy.workflow.core.model.FlowNode;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface NodeRepository extends JpaRepository<FlowNode, String> {

    @Query("select t from FlowBranch b, FlowNode t where b.sourceNodeId=?1 and b.targetNodeId=t.id")
    List<FlowNode> findNextNodes(String sourceId);

}
